﻿@model YubikeyAzureAuth.Web.Models.LogOnModel
@{
    ViewBag.Title = "YubiKey Azure Auth";
}

<img src="../../Content/images/PoweredByWA.png" alt="Powered by Windows Azure" />

<h2 class="welcome-text">@ViewBag.Message</h2>

@if(Request.IsAuthenticated) {
    <h2><font color="green">Log in succeeded!</font></h2>
}

<p>
    If you register a user and have a YubiKey you can test YubiKey authentication below. @Html.ActionLink("Register here", "Register", "Account") if you don't have an account.
</p>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/MicrosoftAjax.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/MicrosoftMvcValidation.js")" type="text/javascript"></script>

@Html.ValidationSummary(true, "Login was unsuccessful. Please correct the errors and try again.")

@{ Html.EnableClientValidation(); }

@using (Html.BeginForm("LogOn", "Account"))
{
    
    <div>
        <fieldset>

            <div class="editor-label">
                @Html.LabelFor(m => m.UserName)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.UserName)
                @Html.ValidationMessageFor(m => m.UserName)
            </div>

            <div class="editor-label">
                @Html.LabelFor(m => m.Password)
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.Password)
                @Html.ValidationMessageFor(m => m.Password)
            </div>

            <div class="editor-label">
                @Html.LabelFor(m => m.OTP)
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.OTP)
                @Html.ValidationMessageFor(m => m.OTP)
            </div>

            <div class="editor-label">
                @Html.CheckBoxFor(m => m.RememberMe)
                @Html.LabelFor(m => m.RememberMe)
            </div>

            <p>
                <input type="submit" value="Log On" />
            </p>
        </fieldset>
    </div>
}

<p>
    To learn more about YubiKey please visit <a href="http://www.yubico.com" title="Yubico Website" target="_blank">http://www.yubico.com</a>.
</p>
<p>
This demo together with source code can be downloaded from <a href="http://yubikeyazureauth.codeplex.com" title="yubikeyazureauth.codeplex.com" target="_blank">yubikeyazureauth.codeplex.com</a>.
</p>


